﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace WineStore.Models
{
    public partial class Order
    {
        public int OrderId { get; set; }

        [Required(ErrorMessage="Required!")]
        public string FullName { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string Address { get; set; }

        [Required(ErrorMessage = "Required!")]
        public string Phone { get; set; }
        
        public string Email { get; set; }

        [DisplayFormat(DataFormatString = "{0:0}", ApplyFormatInEditMode = true)]
        public decimal Total { get; set; }
        
        public DateTime OrderDate { get; set; }

        [Required(ErrorMessage = "Required!")]
        public int CustomerId { get; set; }

        public int Status { get; set; }

        public virtual Customer Customer { get; set; }
        
        public List<OrderDetail> OrderDetails { get; set; }
    }
}